/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86136
 * Date: 2025-04-20
 * Time: 12:57
 */
//二维坐标上的一个点
class Point {

}
//工厂模式
class PointFactory {
    public static Point makePointByXY(double x, double y) {
        Point p = new Point();
        //通过x和y给p进行属性设置
        //.....
        return p;
    }
    public static Point makePointByRA(double r, double a) {
        Point p = new Point();
        //通过r和a给p进行属性设置
        //......
        return p;
    }
}
public class Demo45 {
    public static void main(String[] args) {
        Point p = PointFactory.makePointByXY(3,4);
    }
}
